export default (options, app) => {
  return async (ctx, next) => {
    if (ctx.request.method === 'POST' && ctx.request.url === `/${app.config.wechatApi.apiEventPrefix}`) {
      app.wechatEvent.handlerEntrance(ctx, ctx.request.body)
    }
    await next()
  }
}
